package com.huishu.goods.fegin;

import com.huishu.commons.pojo.Result;
import com.huishu.goods.fegin.fallback.OrderFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName：UserFeignClient
 * @Author: ljj
 * @Date: 2023/4/10 16:27
 * @Description:
 */
@FeignClient(name = "order-server", path = "/order", fallbackFactory = OrderFeignClientFallBack.class)
public interface OrderFeignClient {


    /**
     * 删除购物车中的商品根据sku
     * @param skus
     * @return
     */
    @PostMapping("/cart-item/remove-cartItem-skus")
    Result removeCartltemBySkus(@RequestBody List<String> skus);


    /**
     * 删除购物车中的商品根据商品id
     * @param id
     * @return
     */
    @DeleteMapping("/cart-item/remove-cartItem/{id}")
    Result removeCartltemByProductId(@PathVariable Long id);
}
